if (isMultiplayer) then {
	If (isServer) then {
		[] spawn {
			if (!(isNil "TYR_TIMESYNC_StartTime") && {TYR_TIMESYNC_StartTime > 0}) then {
				skipTime (TYR_TIMESYNC_StartTime - DayTime);
				diag_log format["Time SYNC set: %1", dayTime];
			};
			TYR_TIME_SYNC = [];
			TYR_TIME_SYNC set [0, daytime];
			TYR_TIME_SYNC set [1, time];
			while {true} do {
				TYR_TIME_SYNC set [0, daytime];
				// This is the start time, so we don't overwrite it!
				// TYR_TIME_SYNC set [1, time];
				publicVariable "TYR_TIME_SYNC";
				sleep 14.2345;
			};
		};
	};

	if (!isDedicated) then {
		[] spawn {
			private ["_value"];
			waituntil{ sleep 0.2345; !isnil "TYR_TIME_SYNC"};
			sleep 1;
			diag_log "TIME SYNC: Start";
			while {true} do {
				_value = TYR_TIME_SYNC select 0;
				skipTime (_value - DayTime);
				sleep 30.2345;
			};
		};
	};
} else {
	if (!(isNil "TYR_TIMESYNC_StartTime") && {TYR_TIMESYNC_StartTime > 0}) then {
		skipTime (TYR_TIMESYNC_StartTime - DayTime);
		diag_log format["Time SYNC set: %1", dayTime];
	};
};